package com.gnote.config;

import org.springframework.ai.chat.memory.ChatMemoryRepository;
import org.springframework.ai.chat.messages.Message;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 自定义聊天记忆
 */
@Component
public class CustomChatMemoryRepository implements ChatMemoryRepository {


    @Override
    public List<String> findConversationIds() {
        // 从数据库中查询

        return List.of();
    }

    @Override
    public List<Message> findByConversationId(String conversationId) {
        // 从数据库中查询
        return List.of();
    }

    @Override
    public void saveAll(String conversationId, List<Message> messages) {
        // 保存到数据库中
    }

    @Override
    public void deleteByConversationId(String conversationId) {
        // 删除数据库中记录

    }
}
